public class QuizCheck
{
   /**
      Checks whether a string of quiz answers is valid. It must 
      contain an answer A, B, C, or D for each expected answer, or an 
      X to indicate that no answer was provided.
      @param input the answer string
      @param questions the number of questions in the string
      @return true if the string was valid, false otherwise
   */
   public static boolean checkInputs(String input, int questions)
   {
      boolean f=true;
      int s1=input.length();
      if(s1==questions){
         for(int i=0;i<s1;i++){
            char m1;
            m1=input.charAt(i);
            if(m1!='A'&&m1!='B'&&m1!='C'&&m1!='D'&&m1!='X'){
               f=false;
               break;
            }else{continue;}
         }
      }else{f=false;}
      return f;
   }
}